<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>ChRt: C:/Users/bill/Documents/ArduinoSdFs/libraries/ChRt/src/ChRt.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ChRt
   </div>
   <div id="projectbrief">ChibiOS/RT Arduino</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ChRt.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>main ChRt include file.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;rt/ch.h&quot;</code><br />
</div>
<p><a href="_ch_rt_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:acdb3e86f36ba7ea83d508e406d29dca1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#acdb3e86f36ba7ea83d508e406d29dca1">HANDLER_STACK_SIZE</a>&#160;&#160;&#160;400</td></tr>
<tr class="separator:acdb3e86f36ba7ea83d508e406d29dca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a745e6a77bbc187994fb79c2eb5450769"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#a745e6a77bbc187994fb79c2eb5450769">chBegin</a> (void(*mainThread)())</td></tr>
<tr class="separator:a745e6a77bbc187994fb79c2eb5450769"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e513af394d20a21b12570380bb56773"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#a0e513af394d20a21b12570380bb56773">chUnusedHandlerStack</a> ()</td></tr>
<tr class="separator:a0e513af394d20a21b12570380bb56773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b867b2762d19663f32931a3fa4ae94c"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#a2b867b2762d19663f32931a3fa4ae94c">chUnusedMainStack</a> ()</td></tr>
<tr class="separator:a2b867b2762d19663f32931a3fa4ae94c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ae19ba1b487fdb8ea7d1608e64a2125"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#a9ae19ba1b487fdb8ea7d1608e64a2125">chUnusedThreadStack</a> (void *wsp, size_t size)</td></tr>
<tr class="separator:a9ae19ba1b487fdb8ea7d1608e64a2125"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a1425ec66529dd4aec14702b02451d2"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#a9a1425ec66529dd4aec14702b02451d2">heapEnd</a> ()</td></tr>
<tr class="separator:a9a1425ec66529dd4aec14702b02451d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a5009aeaddf095fe34fee2fd029171c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#a8a5009aeaddf095fe34fee2fd029171c">errorBlink</a> (int n)</td></tr>
<tr class="separator:a8a5009aeaddf095fe34fee2fd029171c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf8591d7b313ba25ab8365d5ac0a8eb7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_ch_rt_8h.html#abf8591d7b313ba25ab8365d5ac0a8eb7">st_lld_init</a> (void)</td></tr>
<tr class="separator:abf8591d7b313ba25ab8365d5ac0a8eb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>main ChRt include file. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="acdb3e86f36ba7ea83d508e406d29dca1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HANDLER_STACK_SIZE&#160;&#160;&#160;400</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Size of handler stack. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a745e6a77bbc187994fb79c2eb5450769"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chBegin </td>
          <td>(</td>
          <td class="paramtype">void(*)()&#160;</td>
          <td class="paramname"><em>mainThread</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Starts ChibiOS/RT - does not return. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mainThread</td><td>Function to be called before repeated calls to loop(). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0e513af394d20a21b12570380bb56773"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t chUnusedHandlerStack </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Determine unused bytes in the handler stack.</p>
<dl class="section return"><dt>Returns</dt><dd>number of unused bytes </dd></dl>

</div>
</div>
<a class="anchor" id="a2b867b2762d19663f32931a3fa4ae94c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t chUnusedMainStack </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Determine unused bytes in the main() thread stack.</p>
<dl class="section return"><dt>Returns</dt><dd>number of unused bytes </dd></dl>

</div>
</div>
<a class="anchor" id="a9ae19ba1b487fdb8ea7d1608e64a2125"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t chUnusedThreadStack </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>wsp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Determine number unused bytes in a thread's stack.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">wsp</td><td>pointer to working space for thread </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>working space size</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Unused byte count. Most accurate if called from the main thread. Some versions of sbrk() don't work correctly when called from another thread. </dd></dl>

</div>
</div>
<a class="anchor" id="a8a5009aeaddf095fe34fee2fd029171c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void errorBlink </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Blink an error pattern</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>number of short pulses </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9a1425ec66529dd4aec14702b02451d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t* heapEnd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Heap end address. Best if called from the main thread. </dd></dl>

</div>
</div>
<a class="anchor" id="abf8591d7b313ba25ab8365d5ac0a8eb7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void st_lld_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Low level ST driver initialization. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
